package com.apache.portal.weixin.core.manager.impl.parser;

import org.jdom.Element;
import org.jdom.JDOMException;

import com.apache.portal.weixin.core.manager.impl.WxRecvMsgBaseParser;
import com.apache.portal.weixin.entity.recv.WxRecvMsg;
import com.apache.portal.weixin.entity.recv.WxRecvVoiceMsg;

/**
  * description: 语音消息转换代理接口实现
  * @author Hou DaYu 创建时间：下午05:36:59
 */
public class WxRecvVoiceMsgParser extends WxRecvMsgBaseParser {

	@Override
	protected WxRecvVoiceMsg parser(Element root, WxRecvMsg msg) throws JDOMException {
		String MediaId = getElementText(root, "MediaId");
		String Format = getElementText(root, "Format");

		return new WxRecvVoiceMsg(msg, MediaId, Format);
	}

}
